<%@ page import="java.util.Enumeration" %><%--
  Created by IntelliJ IDEA.
  User: hadoop
  Date: 17-6-13
  Time: 下午2:07
  用来响应来自form.jsp的post请求
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Form-Result</title>
</head>
<body>
<%
    Enumeration<String> headerNames = request.getHeaderNames();
    while(headerNames.hasMoreElements()){
        String headerName =headerNames.nextElement();
        out.println(headerName+"=>"+request.getHeader(headerName)+"<br>");
    }
    out.println("<hr>");
    request.setCharacterEncoding("UTF-8");
    out.println("Name: "+request.getParameter("name")+"<br>");
    out.println("Gender: "+request.getParameter("gender")+"<br>");
    out.println("Colors: ");
    for(String c : request.getParameterValues("color")){
        out.println(c+" ");
    }
    out.println("<br>");
    out.println("Country: "+request.getParameter("country")+"<br>");
%>
</body>
</html>
